
cc.Class({
    extends: cc.Component,

    properties: {

    },

    // LIFE-CYCLE CALLBACKS:

    start () {
        this.schedule(this.changeProgressBar, 0.05);
    },

    changeProgressBar () {
        this.node.getComponent(cc.Sprite).fillRange -= 0.01;
        if (this.node.getComponent(cc.Sprite).fillRange <= 0) {
            this.unschedule(this.changeProgressBar);
        }
    },

    runAgain () {
        // 只用在按钮上(不重要)
        this.node.getComponent(cc.Sprite).fillRange = 1;
        this.unschedule(this.changeProgressBar);
        this.schedule(this.changeProgressBar, 0.05);
    }

    // update (dt) {},
});
